ramfandomcom-20200214-history
Real Armor Mod Wiki/Implementing RAM/Standalone Implementation
=Ammunition Tweaks= No Modification Required KE Bullets/Shells, any HE (indirectHit) weapon: all work without modification. (Values like initSpeed, airFriction, and caliber may need to be tweaked to better match IRL). Add HEAT Warheads Whether Bullet, Shell, Rocket, or Missile, all HEAT weapons in RAM are broken into two parts: the parent projectile and the heat warhead itself which does the actual armor penetrating. This requires: # Tweaks to the parent CfgAmmo entry # An additional CfgAmmo entry for the HEAT penetrator itself class CfgAmmo { class MyAmmo //parent projectile (your standard ammo type) { ... caliber = 0; // there should be no penetration on the part of the parent projectile ais_penetrators[] = {"MyPenetrator"}; //specifies the name of the HEAT penetrator CfgAmmo class ... }; class MyPenetrator: BulletBase //armor-penetrating warhead for "MyAmmo" { /****Standard values (do not change unless you know exactly what you're doing)****/ typicalSpeed = 100; //this makes hit damage correspond to a *hard-coded* initial velocity of 100 m/s for all HEAT penetrators timeToLive = 0.2; //HEAT jets are ineffective beyond a few meters explosive = 0; //damage falls off with speed airFriction = 0.01; //a realistic value would be even higher, but Arma code cannot handle high aF values simulationStep = 0.5; //(just reinforcing the default value for sS) /****User-set values****/ caliber = /* #>0 */; //penetration goes here--remember to standardize for a velocity of 100 m/s ... }; Guidance on CfgAmmo Properties :;caliber: :Parent ammo should essentially always be caliber = 0. Also remember: :*Values for explosive >= 0.7 will nullify caliber :*''caliber'' is effectively null for Arma rockets/missiles :;indirectHit: :It is imperative that this value be kept low for both parent & penetrator ammo. Values around 10(?) or so will sufficiently damage infantry, but generally be low enough for AFV minimalHit and explosionShielding to counteract it. iH should only be high if the weapon has massive explosive power capable of damaging an AFV regardless of armor (e.g. a 500 lb bomb, gigantic IED, etc). :;indirectHitRange: :If the parent ammo creates an explosion, you can give it an iHR value based on the actual "lethal radius" of the explosion. The iHR of a penetrator should be low or 0--otherwise it will create an unrealistically large "tunnel" of damage as it penetrates. (Expand for more discussion) :;Initial velocity: :Penetrators are not fired out of a standard Arma CfgMagazine with an "initSpeed" value. Instead, their initial velocity is set by code to 100 m/s. This artificially low value is designed to discourage fire geometry errors. (Actual HEAT jets travel at 3000-8000 m/s). But don't worry, the speed need not be realistic for the HEAT penetrator to work--all that matters is that the penetration be accurate. Just make sure you calibrate your penetration value ("caliber") based on a speed of 100 m/s. :;Naming conventions: :You could name your penetrator ammo by RHA penetration value, e.g. "Heat_430" would have a "caliber" of 286.6, yielding a penetration of 429.9mm vs RHA. =Vehicle Tweaks= Adjust Global Values General Armor Armor is defined in the Fire Geometry LOD. *Regular (non-CE) armor should have the armour.rvmat material applied (or one of the armour_plate materials if you want to use preset thickness). **This applies to non-RHA armors (aluminum, etc.)--just make sure to convert them to RHAe thickness. *All armor thickness should be expressed in terms of RHAe (the equivalent thickness in RHA), regardless of the material. This includes Composite armor. *Non-armor components (stowage boxes, machine guns, etc.) should typically use the metal/metal_plate materials. *FG pieces should never interpenetrate each other--this often causes the game to ignore the 2nd surface hit (the deeper the interpenetration, the more likely the problem). CE Armor Composite Armor *Thickness should be in RHAe. *The material applied to CE armor must be one of the custom types from the RAM XXX config file. P3D model.cfg config.cpp ;ais_ce_protector = "show_ce_hull";: This anim is fired by the code and the name can be any *one* model.cfg hide/show CE animation; they are all tied to a "direct" source in SourceAnimations and will therefore all fire when one is triggered. ERA ERA takes more work to implement than Composite: *There are usually lots of pieces of ERA *Unlike Composite, ERA depletes with damage, adding another layer of animation requirements Combine Small Elements While it is not a requirement, it is highly recommended to combine small ERA elements--e.g. Russian "Kontakt-1" / "K1"--into larger groups. Hitpoint Standards for ERA The following standards are suggested for ERA hit locations :;Single Element: :*armor :*minimalHit :*explosionShielding :;Combined Element (4 x K1 "bricks"): :*armor :*minimalHit :*explosionShielding P3D :;Visual LODs: :*Name each element after the visual/depletion bone. :;Fire Geometry: :*Name each shell element after the visual/depletion bone. :*Name each CE element after the FG-CE bone. :*Do not overlap either named selection set to encompass the other's geometry. CE & shell elements should belong to separate bones with no overlap. model.cfg *Create a bone for each visual/depletion element. Depletion bones are children of the root ("") for hull-mounted ERA, or the turret bone (whatever name you use) for turret-mounted ERA. *Create a bone for each CE element. CE bones are children of their respective ERA depletion bone (created above). This is how CE bones know to remain disabled (hidden) when the ERA element is depleted. =Optional Tweaks= Configuring Interior Space Added Hit Locations Extra hit locations are not required, but they are recommended to enhance vehicle realism and detail. A common example in RAM vehicles is explosive ammo: # Improved DestructionEffects Whole Vehicle Hit Location If possible, add custom DestructionEffects to hit locations that would benefit from them--e.g. explosive ammo locations. =Tips= Not RAM requirements, just some general Arma practices to remember: ;Remember to "Find Components": Make sure to run Structure>Topology>Find Components on your Fire Geometry and Geometry LOD's; Arma will ignore pieces of geometry in those LOD's that don't have a distinct named selection for each piece--you will be able to walk/shoot right through them as if they weren't there. (The Find Components command conveniently does this for you, although you may want to rename the results for clarity). In those LOD's, simply having a group named selection for multiple pieces of geometry is not enough--each piece of geometry must also have an individual named selection. ;FG Interpenetration is Bad: Let me repeat: FG pieces should never interpenetrate each other--this often causes the game to ignore the 2nd surface hit (the deeper the interpenetration, the more likely the problem).